.class public Lcom/facebook/orca/auth/StartScreenActivity;
.super Lcom/facebook/orca/activity/OrcaActivity;
.source "StartScreenActivity.java"


# annotations
.annotation runtime Lcom/facebook/orca/annotations/AuthNotRequired;
.end annotation


# instance fields
.field c:Lcom/facebook/orca/auth/FacebookAuthorizeHelper;
    .annotation runtime Lcom/google/inject/Inject;
    .end annotation
.end field

.field private d:Ljava/lang/String;

.field private e:Lcom/facebook/orca/auth/AuthenticationManager;
    .annotation runtime Lcom/google/inject/Inject;
    .end annotation
.end field

.field private f:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;
    .annotation runtime Lcom/google/inject/Inject;
    .end annotation
.end field

.field private g:Landroid/widget/Button;
    .annotation runtime Lroboguice/inject/InjectView;
        a = 0x7f0800ca
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 30
    invoke-direct {p0}, Lcom/facebook/orca/activity/OrcaActivity;-><init>()V

    .line 32
    const-string v0, "StartScreenActivity"

    iput-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->d:Ljava/lang/String;

    return-void
.end method

.method static synthetic a(Lcom/facebook/orca/auth/StartScreenActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 30
    invoke-direct {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->b()V

    return-void
.end method

.method private b()V
    .locals 2

    .prologue
    .line 105
    invoke-virtual {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "webview.db"

    invoke-virtual {v0, v1}, Landroid/content/Context;->deleteDatabase(Ljava/lang/String;)Z

    .line 106
    invoke-virtual {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "webviewCache.db"

    invoke-virtual {v0, v1}, Landroid/content/Context;->deleteDatabase(Ljava/lang/String;)Z

    .line 108
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->c:Lcom/facebook/orca/auth/FacebookAuthorizeHelper;

    new-instance v1, Lcom/facebook/orca/auth/StartScreenActivity$2;

    invoke-direct {v1, p0}, Lcom/facebook/orca/auth/StartScreenActivity$2;-><init>(Lcom/facebook/orca/auth/StartScreenActivity;)V

    invoke-virtual {v0, v1}, Lcom/facebook/orca/auth/FacebookAuthorizeHelper;->a(Lcom/facebook/android/Facebook$DialogListener;)V

    .line 128
    return-void
.end method

.method static synthetic b(Lcom/facebook/orca/auth/StartScreenActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 30
    invoke-direct {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->c()V

    return-void
.end method

.method private c()V
    .locals 2

    .prologue
    .line 140
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->c:Lcom/facebook/orca/auth/FacebookAuthorizeHelper;

    invoke-virtual {v0}, Lcom/facebook/orca/auth/FacebookAuthorizeHelper;->a()Lcom/facebook/orca/auth/FacebookCredentials;

    move-result-object v0

    .line 141
    iget-object v1, p0, Lcom/facebook/orca/auth/StartScreenActivity;->e:Lcom/facebook/orca/auth/AuthenticationManager;

    invoke-virtual {v1, v0}, Lcom/facebook/orca/auth/AuthenticationManager;->a(Lcom/facebook/orca/auth/FacebookCredentials;)V

    .line 142
    const/4 v0, -0x1

    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/StartScreenActivity;->setResult(I)V

    .line 143
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->f:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;

    invoke-virtual {v0}, Lcom/facebook/orca/activity/AuthenticatingActivityHelper;->d()Landroid/content/Intent;

    move-result-object v0

    .line 144
    const/high16 v1, 0x400

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 145
    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/StartScreenActivity;->startActivity(Landroid/content/Intent;)V

    .line 146
    invoke-virtual {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->finish()V

    .line 147
    return-void
.end method

.method static synthetic c(Lcom/facebook/orca/auth/StartScreenActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 30
    invoke-direct {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->d()V

    return-void
.end method

.method private d()V
    .locals 2

    .prologue
    .line 150
    invoke-static {p0}, Lcom/facebook/orca/common/dialogs/ErrorDialogBuilder;->a(Landroid/content/Context;)Lcom/facebook/orca/common/dialogs/ErrorDialogBuilder;

    move-result-object v0

    const v1, 0x7f0a0015

    invoke-virtual {v0, v1}, Lcom/facebook/orca/common/dialogs/ErrorDialogBuilder;->a(I)Lcom/facebook/orca/common/dialogs/ErrorDialogBuilder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/facebook/orca/common/dialogs/ErrorDialogBuilder;->a()Landroid/app/AlertDialog;

    .line 153
    return-void
.end method


# virtual methods
.method protected a(Landroid/os/Bundle;)V
    .locals 1
    .parameter

    .prologue
    .line 56
    invoke-super {p0, p1}, Lcom/facebook/orca/activity/OrcaActivity;->a(Landroid/os/Bundle;)V

    .line 57
    const v0, 0x7f030032

    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/StartScreenActivity;->setContentView(I)V

    .line 58
    return-void
.end method

.method protected b(Landroid/os/Bundle;)V
    .locals 2
    .parameter

    .prologue
    .line 62
    invoke-super {p0, p1}, Lcom/facebook/orca/activity/OrcaActivity;->b(Landroid/os/Bundle;)V

    .line 64
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->f:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;

    invoke-virtual {v0}, Lcom/facebook/orca/activity/AuthenticatingActivityHelper;->a()V

    .line 66
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->g:Landroid/widget/Button;

    new-instance v1, Lcom/facebook/orca/auth/StartScreenActivity$1;

    invoke-direct {v1, p0}, Lcom/facebook/orca/auth/StartScreenActivity$1;-><init>(Lcom/facebook/orca/auth/StartScreenActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 72
    return-void
.end method

.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 132
    invoke-super {p0, p1, p2, p3}, Lcom/facebook/orca/activity/OrcaActivity;->onActivityResult(IILandroid/content/Intent;)V

    .line 134
    const/16 v0, 0x7f99

    if-ne p1, v0, :cond_0

    .line 135
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->c:Lcom/facebook/orca/auth/FacebookAuthorizeHelper;

    invoke-virtual {v0, p1, p2, p3}, Lcom/facebook/orca/auth/FacebookAuthorizeHelper;->a(IILandroid/content/Intent;)V

    .line 137
    :cond_0
    return-void
.end method

.method public onAttachedToWindow()V
    .locals 2

    .prologue
    .line 48
    invoke-super {p0}, Lcom/facebook/orca/activity/OrcaActivity;->onAttachedToWindow()V

    .line 49
    invoke-virtual {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    .line 51
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/view/Window;->setFormat(I)V

    .line 52
    return-void
.end method

.method protected onDestroy()V
    .locals 0

    .prologue
    .line 76
    invoke-super {p0}, Lcom/facebook/orca/activity/OrcaActivity;->onDestroy()V

    .line 77
    return-void
.end method

.method protected onResume()V
    .locals 3

    .prologue
    .line 81
    invoke-super {p0}, Lcom/facebook/orca/activity/OrcaActivity;->onResume()V

    .line 83
    invoke-virtual {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    .line 84
    if-eqz v0, :cond_0

    const-string v1, "no_silent_login"

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v0

    if-nez v0, :cond_1

    .line 85
    :cond_0
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->e:Lcom/facebook/orca/auth/AuthenticationManager;

    invoke-virtual {v0}, Lcom/facebook/orca/auth/AuthenticationManager;->b()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 88
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->f:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;

    invoke-virtual {v0}, Lcom/facebook/orca/activity/AuthenticatingActivityHelper;->d()Landroid/content/Intent;

    move-result-object v0

    .line 89
    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/StartScreenActivity;->startActivity(Landroid/content/Intent;)V

    .line 90
    invoke-virtual {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->finish()V

    .line 100
    :cond_1
    :goto_0
    return-void

    .line 93
    :cond_2
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->f:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;

    invoke-virtual {v0}, Lcom/facebook/orca/activity/AuthenticatingActivityHelper;->b()Z

    move-result v0

    if-nez v0, :cond_1

    .line 94
    iget-object v0, p0, Lcom/facebook/orca/auth/StartScreenActivity;->f:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;

    invoke-virtual {v0}, Lcom/facebook/orca/activity/AuthenticatingActivityHelper;->c()Landroid/content/Intent;

    move-result-object v0

    .line 95
    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/StartScreenActivity;->startActivity(Landroid/content/Intent;)V

    .line 96
    invoke-virtual {p0}, Lcom/facebook/orca/auth/StartScreenActivity;->finish()V

    goto :goto_0
.end method
